#!/usr/bin/env python
#
#    Copyright (C) 2012 Gonzalo Bonigo <gonzalobonigo@gmail.com>
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see http://www.gnu.org/licenses/
#


"""
    Este es un modulo ejecutable que permite listar todos los caminos de un
    sistemas.
"""

__version__ = 3.1

import os.path
import time
import sys
import os

from daddyparsers import *
from lts import utils

if __name__ == "__main__":
    # Parseo los argumentos de entrada.
    system = parse(sys.argv[1:],1,1)["system"]
    # Recorro la lista de subsistemas.
    for subsystem in system:
        print "\nPath for subsystem", subsystem.name, \
              subsystem.get_event_set('o')
        for p in subsystem.list_paths():
            print ((utils.path_to_string(p,subsystem,None)).split('\t'))[0]
